package com.shangting.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;

// 实体类与表映射:
// 实体类通过 @TableName 和字段注解（如 @TableField）指定表和字段的对应关系。
// 没有显式注解时，MP 会根据约定（如类名与表名的驼峰转下划线规则）推导映射。
@Schema(description = "公寓&配套关系")
@TableName(value = "apartment_facility")
//@Builder
public class ApartmentFacility extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "公寓id")
    @TableField(value = "apartment_id")
    private Long apartmentId;

    @Schema(description = "设施id")
    @TableField(value = "facility_id")
    private Long facilityId;

    public ApartmentFacility() {
    }

    public void setApartmentId(Long apartmentId) {
        this.apartmentId = apartmentId;
    }

    public void setFacilityId(Long facilityId) {
        this.facilityId = facilityId;
    }

    public Long getApartmentId() {
        return apartmentId;
    }

    public Long getFacilityId() {
        return facilityId;
    }

    @Override
    public String toString() {
        return "ApartmentFacility{" +
                "apartmentId=" + apartmentId +
                ", facilityId=" + facilityId +
                '}';
    }
}